<%--
  Created by IntelliJ IDEA.
  User: zhangjie
  Date: 2019/5/28
  Time: 1:59 PM
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/jsp/component/common.jsp" %>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" ></meta>
    <title>医生数据</title>
    <link rel="stylesheet" href="${frames}/css/lib/bootstrap.min.css" type="text/css" type="text/css">
    <link rel="stylesheet" href="${frames}/css/lib/bootstrap-datetimepicker.min.css" type="text/css" type="text/css">
    <link rel="stylesheet" href="${frames}/css/lib/dataTables.bootstrap.css" type="text/css">
    <%--<link rel="stylesheet" href="../assets/css/views/modules/_common.scss">--%>
    <link rel="stylesheet" href="${assets}/css/views/department/departmentMgr.css">
    <script src="../assets/js/views/vue.min.js"></script>
    <%@ include file="/WEB-INF/jsp/component/commonBottom.jsp" %>
    <script src="${frames}/Chronic/laydate/laydate.js"></script>
    <script type="text/javascript" src="../assets/js/echarts.js"></script>
    <style>
        *{
            margin:0;
            padding:0;
            list-style:none !important;
            text-decoration:none;
        }
        .page_nav li{
            list-style:none !important;
        }
        .page_nav li span{
            margin:0 !important;
        }
        h3{
            width: 82px;
            margin-top:0px !important;
            font-family: MicrosoftYaHei;
            font-size: 20px;
            font-weight: normal;
            font-stretch: normal;
            letter-spacing: 0.4px;
            color: #2a3137;
            margin-bottom:22px;
        }
        .titleText{
            width:5px;
            height:25px;
            display:inline-block;
            background:#35acfd;
            vertical-align:top;
            margin-right:10px;
        }
        .moduleContent{
            margin-bottom:40px;
        }
        .title{
            width:100%;
            overflow:hidden;
            height:30px;
        }
        .title span{
            font-size:17px;
            line-height:25px;
            display:inline-block;
        }
        .contentList{
            width:100%;
            overflow:hidden;
            overflow-y:hidden;
            height:auto !important;
        }
        .contentList ul{
            height:43px;
        }
        .contentList ul li{
            float:left;
            width:100px;
            margin:0 20px;
        }
        .statistics ul li{
            float:left;
            width:100px;
            margin:0 20px;
        }
        input[type=radio] {
            -webkit-appearance: none;
            border-radius:50%;
            background-image: url('../assets/images/nocheck.png');
            background-size:100% 100%
        }
        input[type=radio]:checked{
            background-image: url('../assets/images/checkout.png');
            background-size:100% 100%
        }
        .check input{
            width:20px;
            height:20px;
            vertical-align: middle;
            margin-bottom:7px;
        }
        .contentList ul li span,label{
            font:15px/44px 微软雅黑 !important;
            color:#666666 !important;
        }
        .contentList ul li .label{
            margin-left:10px;
        }
        #query{
            width: 100px;
            display:inline-block;
            background-color:#35acfd;
            border-radius: 5px;
            font-family: MicrosoftYaHei;
            font-size: 16px;
            font-weight: normal;
            font-stretch: normal;
            letter-spacing: 0.3px;
            color: #ffffff;
            line-height:25px;
            vertical-align:top;
            border:none;
        }
        .statistics{
            width:100%;
            min-width:970px;
            overflow: auto;
        }
        .statistics ul li{
            width:280px;
            height:145px;
            border-radius:5px;
            color:white;
        }
        .statistics ul li span{
            color:white !important;
            font-size:15px;
        }
        .statistics ul li b{
            font-size:35px;
            margin-left:5px;
        }
        .statistics ul li .titleNumber{
            line-height:30px;
            font-size:15px;
        }
        .statistics ul li:nth-child(1){
            background: -webkit-linear-gradient(left, #fc5d68 , #ff7c66);
        }
        .statistics ul li:nth-child(2){
            background: -webkit-linear-gradient(left, #ff9459 , #ffc75d);
        }
        .statistics ul li:nth-child(3){
            background: -webkit-linear-gradient(left, #20a7dd , #26cbd3);
        }
        .statistics ul li:nth-child(4){
            background: -webkit-linear-gradient(left, #c7dd59, #d3bf41);
        }
        .img{
            width:40px;
            height:40px;
            display:inline-block;
            border-radius:50% 50%;
            background:white;
            vertical-align:middle;
            float:right;
            margin-top:4px;
        }
        .line{
            width:100%;
            height:2px;
            background:white;
            margin-top:16px;
        }
        .list{
            width:515px;
            height:230px;
            border-radius:5px;
            border:1px solid #c0c0c0;
            margin-left:20px;
            display:inline-block;
            float:left;
        }
        .list ul{
            height:180px;
            overflow-y:scroll;
            overflow-x:hidden;
        }
        .list ul li{
            width:100%;
            margin:0 20px;
        }
        .list ul li span:nth-child(1){
            width:6px;
            height:6px;
            background:#35acfd;
            border-radius:50% 50%;
            display:inline-block;
            vertical-align:middle;
        }
        .list ul li span:nth-child(2){
            width:100px;
            margin-left:28px;
        }
        .list ul li span:nth-child(3){
            width:140px;
            margin-left:15px;
            margin-right:15px;
        }
        .list ul li span{
            line-height:35px;
            font-size:15px;
            display:inline-block;
        }
        .list p{
            width:100%;
            text-align:left;
            color:white;
            background:-webkit-linear-gradient(left, #7c8efc , #0cb1fd);
            font-size:15px;
            line-height:35px;
            text-indent:20px;
        }
        .xyqk{
            display:inline-block;
            width:360px;
            margin-left:34px;
            border:1px solid #c0c0c0;
            height:230px;
            border-radius:5px;
        }
        .useNumber{
            width:145px;
            display:inline-block;
            background:-webkit-linear-gradient(left, #7b8efc , #0db0fd);
            height:100%;
        }
        .useImg{
            width:40px;
            margin:25px auto;
        }
        .size{
            text-align:center;
            color:white;
        }
        .size b{
            font-size:30px;
        }
        .size span{
            font-size:20px;
        }
        .useNumber p {
            text-align:center;
            font-size:16px;
            margin-top:30px;
            color:white;
        }
        .useContent{
            width:210px;
            display:inline-block;
            float:right;
        }
        .useContent p{
            margin:14px 14px;
            color:#666666;
            font-size:14px;
        }
        .content{
            height:auto !important;
        }
        .userNumberName,.useTitle{
            color:#a9a9a9;
            line-height:35px;
            display:block;
            margin-left:14px;
        }
        .userNumberName{
            font-size:20px;
            color:black;
            display:inline-block;
        }
        .search label{
            margin-left:20px;
            color:#666666;
            font-size:16px !important;
            line-height:20px !important;
        }
        .month{
            width:100%;
            display:block;
            height:50px;
            margin-bottom:-0.5px;
        }
        .month li{
            border:1px solid #d0d0d0;
            width:70px;
            line-height:50px;
            height:50px;
            text-align:center;
            color:#7e7e7e;
            font-size:17px;
            float:left;
            margin:0 -0.5px;
        }
        .month li:nth-child(1){
            width:84px;
        }
        .bpData{
            margin-top:20px;
            margin-left:20px;
        }
        h4{
            display:inline-block;
        }
        .select{
            float:right;
            margin-rightr:50px;
            width:150px;
            height:30px;
            line-height:30px;
            text-indent:20px;
            border:1px solid #d0d0d0;
            margin-left:15px;
            margin-top:10px;
        }
        #beginDate{
            text-indent:10px;
            margin-left:15px;
        }
        #endDate{
            text-indent:10px;
            margin-left:15px;
        }
        #bpAddData{
            text-indent:10px;
            margin-left:15px;
        }
        .lay-date{
            text-indent:10px;
            margin-left:15px;
        }
    </style>
</head>
<body>
<div>
    <%@ include file="../../breadline.jsp" %>
</div>
    <%--<div class="wrap" style="min-width:1024px;">--%>
        <%--<div class="content" >--%>
            <%--<div style="margin-left:14px;padding-top:20px;">--%>
                <%--<h3>数据统计</h3>--%>
                <%--<div class="moduleContent">--%>
                    <%--<div class="title">--%>
                        <%--<span class="titleText"></span>--%>
                        <%--<span>慢病人数</span>--%>
                    <%--</div>--%>
                    <%--<div class="contentList" style="height:auto;">--%>
                        <%--<ul>--%>
                            <%--<li v-for="(item,index) in type">--%>
                                <%--<span class="check" @click="changeType(item)">--%>
                                    <%--<input type="radio" :title="item.id" :name="item.key" :id="item.key" :checked="item.checked">--%>
                                <%--</span>--%>
                                <%--<label class="label" :for="item.key">{{item.name}}</label>--%>
                            <%--</li>--%>
                            <%--&lt;%&ndash;<li>&ndash;%&gt;--%>
                                <%--&lt;%&ndash;<button class="btn btn-success" id="query">筛选</button>&ndash;%&gt;--%>
                            <%--&lt;%&ndash;</li>&ndash;%&gt;--%>
                        <%--</ul>--%>
                    <%--</div>--%>
                    <%--<div class="statistics">--%>
                        <%--<ul>--%>
                            <%--<li style="margin-top:20px;">--%>
                                <%--<div style="width:240px;margin:0 auto;">--%>
                                    <%--<div style="margin-top:25px;">--%>
                                        <%--<b>{{patientNum}}</b>--%>
                                        <%--<span>位</span>--%>
                                        <%--<div class="img">--%>
                                            <%--<img src="../assets/images/user.png" alt="">--%>
                                        <%--</div>--%>
                                    <%--</div>--%>
                                    <%--<p class="line"></p>--%>
                                    <%--<p class="titleNumber">2018年至当年总人数</p>--%>
                                <%--</div>--%>
                            <%--</li>--%>
                            <%--<li style="margin-top:20px;">--%>
                                <%--<div style="width:240px;margin:0 auto;">--%>
                                    <%--<div style="margin-top:25px;">--%>
                                        <%--<b>{{patientNewNum}}</b>--%>
                                        <%--<span>位</span>--%>
                                        <%--<div class="img">--%>
                                            <%--<img src="../assets/images/personName.png" alt="">--%>
                                        <%--</div>--%>
                                    <%--</div>--%>
                                    <%--<p class="line"></p>--%>
                                    <%--<p class="titleNumber">近30天新增人数</p>--%>
                                <%--</div>--%>
                            <%--</li>--%>
                            <%--<li style="margin-top:20px;">--%>
                                <%--<div style="width:240px;margin:0 auto;">--%>
                                    <%--<div style="margin-top:25px;">--%>
                                        <%--<b>{{instrumentUseAllNum}}</b>--%>
                                        <%--<span>次</span>--%>
                                        <%--<div class="img">--%>
                                            <%--<img src="../assets/images/personMenu.png" alt="">--%>
                                        <%--</div>--%>
                                    <%--</div>--%>
                                    <%--<p class="line"></p>--%>
                                    <%--<p class="titleNumber">仪器使用次数</p>--%>
                                <%--</div>--%>
                            <%--</li>--%>
                            <%--<li style="margin-top:20px;">--%>
                                <%--<div style="width:240px;margin:0 auto;">--%>
                                    <%--<div style="margin-top:25px;">--%>
                                        <%--<b>{{countPatientBpTests}}</b>--%>
                                        <%--<span>次</span>--%>
                                        <%--<div class="img">--%>
                                            <%--<img src="../assets/images/personName.png" alt="">--%>
                                        <%--</div>--%>
                                    <%--</div>--%>
                                    <%--<p class="line"></p>--%>
                                    <%--<p class="titleNumber">当年血压检测正常结果次数</p>--%>
                                <%--</div>--%>
                            <%--</li>--%>
                        <%--</ul>--%>
                    <%--</div>--%>
                <%--</div>--%>
                <%--<div class="moduleContent" style="min-width:950px;">--%>
                    <%--<div class="title" style="margin-bottom:22px;">--%>
                        <%--<span class="titleText"></span>--%>
                        <%--<span>仪器使用情况</span>--%>
                    <%--</div>--%>
                    <%--<div class="list">--%>
                        <%--<p>最近10次使用情况</p>--%>
                        <%--<ul>--%>
                            <%--<li v-for="(item,index) in tenUseMsg">--%>
                                <%--<span></span>--%>
                                <%--<span>{{item.realName}}</span>--%>
                                <%--<span>{{item.instrumentType}}</span>--%>
                                <%--<span>{{item.testTime}}</span>--%>
                            <%--</li>--%>
                            <%--<li style="width:100%;text-align:center;line-height:170px;" v-if="noData">列表暂无数据</li>--%>
                        <%--</ul>--%>
                    <%--</div>--%>
                    <%--<div class="xyqk">--%>
                        <%--<div class="useNumber">--%>
                            <%--<div class="useImg">--%>
                                <%--<img src="../assets/images/syqk.png" alt="" >--%>
                            <%--</div>--%>
                            <%--<div class="size">--%>
                                <%--<b>{{instrumentUseAllNum}}</b>--%>
                                <%--<span>次</span>--%>
                            <%--</div>--%>
                            <%--<p>总共使用次数</p>--%>
                        <%--</div>--%>
                        <%--<div class="useContent">--%>
                            <%--<p>使用情况</p>--%>
                            <%--<span class="useTitle" style="margin-top:30px;">设备上传次数（今日）</span>--%>
                            <%--<span class="userNumberName">{{instrumentUseTodayNum}}</span>--%>
                            <%--<span>次</span>--%>
                            <%--<span class="useTitle">活跃设备台数（今日）</span>--%>
                            <%--<span class="userNumberName">{{instrumentActiveTodayNum}}</span>--%>
                            <%--<span>台</span>--%>
                        <%--</div>--%>
                    <%--</div>--%>
                <%--</div>--%>
                <%--<div class="moduleContent">--%>
                    <%--<div class="title" style="margin-bottom:22px;">--%>
                        <%--<span class="titleText"></span>--%>
                        <%--<span>仪器使用次数</span>--%>
                    <%--</div>--%>
                    <%--<div class="bpData" style="width:950px;margin-top:20px;">--%>
                        <%--<h4>血压仪</h4>--%>
                        <%--<select name="" id="" class="select bgDataBar" @change="bpDataSelect()" v-model="bpDataOption">--%>
                            <%--<option value="">全部</option>--%>
                            <%--<option value="1">日</option>--%>
                            <%--<option value="2">周</option>--%>
                            <%--<option value="3">月</option>--%>
                            <%--<option value="4">季</option>--%>
                            <%--<option value="5">半年</option>--%>
                            <%--<option value="6">年</option>--%>
                        <%--</select>--%>
                        <%--<div id="insturmentBar" style="height:360px;width:100%;"></div>--%>
                    <%--</div>--%>
                    <%--<div class="bpData" style="width:950px;margin-top:20px;">--%>
                        <%--<h4>血糖仪</h4>--%>
                        <%--<select name="" id="" class="select bgDataBar" v-model="bsDataOption" @change="bsDataSelect()">--%>
                            <%--<option value="">全部</option>--%>
                            <%--<option value="1">日</option>--%>
                            <%--<option value="2">周</option>--%>
                            <%--<option value="3">月</option>--%>
                            <%--<option value="4">季</option>--%>
                            <%--<option value="5">半年</option>--%>
                            <%--<option value="6">年</option>--%>
                        <%--</select>--%>
                        <%--<div id="insturmentTypeBar" style="height:360px;width:100%;"></div>--%>
                    <%--</div>--%>
                <%--</div>--%>
                <%--<div class="moduleContent">--%>
                    <%--<div class="title" style="margin-bottom:22px;">--%>
                        <%--<span class="titleText"></span>--%>
                        <%--<span>仪器绑定数量</span>--%>
                    <%--</div>--%>
                    <%--<div class="bpData" style="width:950px;margin-top:20px;">--%>
                        <%--<h4>血压仪</h4>--%>
                        <%--<input id="beginDate" type="text" class="lay-date" readonly="readonly" ref="instrumentYear" style="float:right;">--%>
                        <%--<div id="insturmentBindBar" style="height:360px;width:100%;"></div>--%>
                    <%--</div>--%>
                    <%--<div class="bpData" style="width:950px;margin-top:20px;">--%>
                        <%--<h4>血糖仪</h4>--%>
                        <%--<input id="endDate" type="text" class="lay-date" readonly="readonly" ref="instrumentYear" style="float:right;">--%>
                        <%--<div id="insturmentTypeBindBar" style="height:360px;width:100%;"></div>--%>
                    <%--</div>--%>
                <%--</div>--%>
                <%--<div class="moduleContent">--%>
                    <%--<div class="title" style="margin-bottom:22px;">--%>
                        <%--<span class="titleText"></span>--%>
                        <%--<span>慢病新增设备绑定数量</span>--%>
                    <%--</div>--%>
                    <%--<div>--%>
                        <%--<div class="search">--%>
                            <%--<label for="">年份</label>--%>
                            <%--<input id="bpAddData" type="text" class="lay-date" readonly="readonly" ref="instrumentYear">--%>
                        <%--</div>--%>
                        <%--<div style="width:1000px;margin-left:15px;margin-top:20px;min-width:920px;">--%>
                            <%--<ul class="month">--%>
                                <%--<li>--%>

                                <%--</li>--%>
                                <%--<li>1月</li>--%>
                                <%--<li>2月</li>--%>
                                <%--<li>3月</li>--%>
                                <%--<li>4月</li>--%>
                                <%--<li>5月</li>--%>
                                <%--<li>6月</li>--%>
                                <%--<li>7月</li>--%>
                                <%--<li>8月</li>--%>
                                <%--<li>9月</li>--%>
                                <%--<li>10月</li>--%>
                                <%--<li>11月</li>--%>
                                <%--<li>12月</li>--%>
                                <%--<li>总计</li>--%>
                            <%--</ul>--%>
                            <%--<ul class="month">--%>
                                <%--<li>高血压</li>--%>
                                <%--<li v-for="(item,index) in bpData">--%>
                                    <%--{{item}}--%>
                                <%--</li>--%>
                                <%--<li>--%>
                                    <%--{{bpDataCount}}--%>
                                <%--</li>--%>
                            <%--</ul>--%>
                            <%--<ul class="month">--%>
                                <%--<li>糖尿病</li>--%>
                                <%--<li v-for="(item,index) in bfData">--%>
                                    <%--{{item}}--%>
                                <%--</li>--%>
                                <%--<li>--%>
                                    <%--{{bfDataCount}}--%>
                                <%--</li>--%>
                            <%--</ul>--%>
                            <%--<ul class="month" style="display:none">--%>
                                <%--<li>高血脂</li>--%>
                                <%--<li v-for="(item,index) in bgData">--%>
                                    <%--{{item}}--%>
                                <%--</li>--%>
                            <%--</ul>--%>
                            <%--<ul class="month" style="display:none">--%>
                                <%--<li>骨松</li>--%>
                                <%--<li v-for="(item,index) in blData">--%>
                                    <%--{{item}}--%>
                                <%--</li>--%>
                            <%--</ul>--%>
                        <%--</div>--%>
                    <%--</div>--%>
                    <%--<div class="bpData" style="width:950px;margin-top:40px;">--%>
                        <%--<h4>高血压新增绑定</h4>--%>
                        <%--<div id="bpDataBar" style="height:360px;width:100%;"></div>--%>
                    <%--</div>--%>
                    <%--<div class="bpData" style="width:950px;margin-top:40px;display:none;">--%>
                        <%--<h4>高血脂新增绑定</h4>--%>
                        <%--<div id="bgDataBar" style="height:360px;width:100%;"></div>--%>
                    <%--</div>--%>
                    <%--<div class="bpData" style="width:950px;margin-top:40px;">--%>
                        <%--<h4>糖尿病新增绑定</h4>--%>
                        <%--<div id="bfDataBar" style="height:360px;width:100%;"></div>--%>
                    <%--</div>--%>
                    <%--<div class="bpData" style="width:950px;margin-top:40px;display:none;">--%>
                        <%--<h4>骨松新增绑定</h4>--%>
                        <%--<div id="blDataBar" style="height:360px;width:100%;"></div>--%>
                    <%--</div>--%>
                <%--</div>--%>

                <%--<div class="moduleContent">--%>
                    <%--<div class="title" style="margin-bottom:22px;">--%>
                        <%--<span class="titleText"></span>--%>
                        <%--<span>慢病新增档案人数</span>--%>
                    <%--</div>--%>
                    <%--<div>--%>
                        <%--<div class="search">--%>
                            <%--<label for="">年份</label>--%>
                            <%--<input id="bpAddDatafiles" type="text" class="lay-date" readonly="readonly" ref="instrumentYear">--%>
                        <%--</div>--%>
                        <%--<div style="width:1000px;margin-left:15px;margin-top:20px;min-width:920px;">--%>
                            <%--<ul class="month">--%>
                                <%--<li>--%>

                                <%--</li>--%>
                                <%--<li>1月</li>--%>
                                <%--<li>2月</li>--%>
                                <%--<li>3月</li>--%>
                                <%--<li>4月</li>--%>
                                <%--<li>5月</li>--%>
                                <%--<li>6月</li>--%>
                                <%--<li>7月</li>--%>
                                <%--<li>8月</li>--%>
                                <%--<li>9月</li>--%>
                                <%--<li>10月</li>--%>
                                <%--<li>11月</li>--%>
                                <%--<li>12月</li>--%>
                                <%--<li>总计</li>--%>
                            <%--</ul>--%>
                            <%--<ul class="month">--%>
                                <%--<li>高血压</li>--%>
                                <%--<li v-for="(item,index) in bpDataFiles">--%>
                                    <%--{{item}}--%>
                                <%--</li>--%>
                                <%--<li>--%>
                                    <%--{{bpDataCountfiles}}--%>
                                <%--</li>--%>
                            <%--</ul>--%>
                            <%--<ul class="month">--%>
                                <%--<li>糖尿病</li>--%>
                                <%--<li v-for="(item,index) in bfDataFiles">--%>
                                    <%--{{item}}--%>
                                <%--</li>--%>
                                <%--<li>--%>
                                    <%--{{bfDataCountfiles}}--%>
                                <%--</li>--%>
                            <%--</ul>--%>
                            <%--<ul class="month">--%>
                                <%--<li>高血脂</li>--%>
                                <%--<li v-for="(item,index) in bgDataFiles">--%>
                                    <%--{{item}}--%>
                                <%--</li>--%>
                                <%--<li>--%>
                                    <%--{{bgDataCountfiles}}--%>
                                <%--</li>--%>
                            <%--</ul>--%>
                            <%--<ul class="month">--%>
                                <%--<li>骨松</li>--%>
                                <%--<li v-for="(item,index) in bsDataFiles">--%>
                                    <%--{{item}}--%>
                                <%--</li>--%>
                                <%--<li>--%>
                                    <%--{{bsDataCountfiles}}--%>
                                <%--</li>--%>
                            <%--</ul>--%>
                        <%--</div>--%>
                    <%--</div>--%>
                    <%--<div class="bpData" style="width:950px;margin-top:40px;">--%>
                        <%--<h4>高血压档案新增</h4>--%>
                        <%--<div id="bpDataBarfiles" style="height:360px;width:100%;"></div>--%>
                    <%--</div>--%>
                    <%--<div class="bpData" style="width:950px;margin-top:40px;">--%>
                        <%--<h4>高血脂档案新增</h4>--%>
                        <%--<div id="bgDataBarfiles" style="height:360px;width:100%;"></div>--%>
                    <%--</div>--%>
                    <%--<div class="bpData" style="width:950px;margin-top:40px;">--%>
                        <%--<h4>糖尿病档案新增</h4>--%>
                        <%--<div id="bfDataBarfiles" style="height:360px;width:100%;"></div>--%>
                    <%--</div>--%>
                    <%--<div class="bpData" style="width:950px;margin-top:40px;">--%>
                        <%--<h4>骨松档案新增</h4>--%>
                        <%--<div id="bsDataBarfiles" style="height:360px;width:100%;"></div>--%>
                    <%--</div>--%>
                <%--</div>--%>

                <%--<div class="moduleContent">--%>
                    <%--<div class="title" style="margin-bottom:22px;">--%>
                        <%--<span class="titleText"></span>--%>
                        <%--<span>随访月度统计</span>--%>
                    <%--</div>--%>
                    <%--<div class="bpData" style="width:950px;margin-top:20px;">--%>
                        <%--<h4>高血压随访统计</h4>--%>
                        <%--<input id="bpAccompany" type="text" class="lay-date" readonly="readonly" style="float:right">--%>
                        <%--<div id="bpAccompanyDataBar" style="height:360px;width:100%;"></div>--%>
                    <%--</div>--%>
                    <%--<div class="bpData" style="width:950px;margin-top:40px;">--%>
                        <%--<h4>糖尿病随访统计</h4>--%>
                        <%--<input id="bgAccompany" type="text" class="lay-date" readonly="readonly" style="float:right">--%>
                        <%--<div id="bgAccompanyDataBar" style="height:360px;width:100%;"></div>--%>
                    <%--</div>--%>
                    <%--<div class="bpData" style="width:950px;margin-top:40px;">--%>
                        <%--<h4>高血脂随访统计</h4>--%>
                        <%--<input id="bfAccompany" type="text" class="lay-date" readonly="readonly" style="float:right">--%>
                        <%--<div id="bfAccompanyDataBar" style="height:360px;width:100%;"></div>--%>
                    <%--</div>--%>
                    <%--<div class="bpData" style="width:950px;margin-top:40px;">--%>
                        <%--<h4>骨松随访统计</h4>--%>
                        <%--<input id="blAccompany" type="text" class="lay-date" readonly="readonly" style="float:right">--%>
                        <%--<div id="blAccompanyDataBar" style="height:360px;width:100%;"></div>--%>
                    <%--</div>--%>
                <%--</div>--%>
                <%--<div class="moduleContent">--%>
                    <%--<div class="title" style="margin-bottom:22px;">--%>
                        <%--<span class="titleText"></span>--%>
                        <%--<span>慢病新增特殊处理人数</span>--%>
                    <%--</div>--%>
                    <%--<div class="bpData" style="width:950px;margin-top:20px;">--%>
                        <%--<h4>特殊处理病人新增</h4>--%>
                        <%--&lt;%&ndash;<input id="specialAccompany" type="text" class="lay-date" readonly="readonly" style="float:right">&ndash;%&gt;--%>
                        <%--<div v-show="noSpecialData" style="width:100%;text-align:center;padding-top:100px;height: 360px;">暂无数据</div>--%>
                        <%--<div v-show="!noSpecialData" id="special" style="height:360px;width:100%;"></div>--%>

                    <%--</div>--%>
                <%--</div>--%>
            <%--</div>--%>
        <%--</div>--%>
    <%--</div>--%>
<div class="wrap" style="min-width:1024px;">
    <div class="content" >
        <div style="margin-left:14px;padding-top:20px;">
            <h3>数据统计</h3>
            <div class="moduleContent">
                <div class="title">
                    <span class="titleText"></span>
                    <span>慢病仪器绑定数量</span>
                </div>
                <div class="contentList" style="height:auto;">
                    <ul>
                        <li v-for="(item,index) in type">
                                <span class="check" @click="changeType(item)">
                                    <input type="radio" :title="item.id" :name="item.key" :id="item.key" :checked="item.checked">
                                </span>
                            <label class="label" :for="item.key">{{item.name}}</label>
                        </li>
                        <%--<li>--%>
                        <%--<button class="btn btn-success" id="query">筛选</button>--%>
                        <%--</li>--%>
                    </ul>
                </div>
                <div class="statistics">
                    <ul>
                        <li style="margin-top:20px;">
                            <div style="width:240px;margin:0 auto;">
                                <div style="margin-top:25px;">
                                    <b>{{instrumentNumber}}</b>
                                    <span>台</span>
                                    <div class="img">
                                        <img src="../assets/images/user.png" alt="">
                                    </div>
                                </div>
                                <p class="line"></p>
                                <p class="titleNumber">2018年至今年总仪器数量</p>
                            </div>
                        </li>
                        <li style="margin-top:20px;">
                            <div style="width:240px;margin:0 auto;">
                                <div style="margin-top:25px;">
                                    <b>{{instrumentNewNum}}</b>
                                    <span>台</span>
                                    <div class="img">
                                        <img src="../assets/images/personName.png" alt="">
                                    </div>
                                </div>
                                <p class="line"></p>
                                <p class="titleInstrumentNumber">近30天新增仪器数量</p>
                            </div>
                        </li>
                        <li style="margin-top:20px;">
                            <div style="width:240px;margin:0 auto;">
                                <div style="margin-top:25px;">
                                    <b>{{instrumentUseAllNum}}</b>
                                    <span>次</span>
                                    <div class="img">
                                        <img src="../assets/images/personMenu.png" alt="">
                                    </div>
                                </div>
                                <p class="line"></p>
                                <p class="titleNumber">仪器使用次数</p>
                            </div>
                        </li>
                        <li style="margin-top:20px;">
                            <div style="width:240px;margin:0 auto;">
                                <div style="margin-top:25px;">
                                    <b>{{countPatientBpTests}}</b>
                                    <span>次</span>
                                    <div class="img">
                                        <img src="../assets/images/personName.png" alt="">
                                    </div>
                                </div>
                                <p class="line"></p>
                                <p class="titleNumber">当年血压检测正常结果次数</p>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
            <div class="moduleContent" style="min-width:950px;">
                <div class="title" style="margin-bottom:22px;">
                    <span class="titleText"></span>
                    <span>仪器使用情况</span>
                </div>
                <div class="list">
                    <p>最近10次使用情况</p>
                    <ul>
                        <li v-for="(item,index) in tenUseMsg">
                            <span></span>
                            <span>{{item.realName}}</span>
                            <span>{{item.instrumentType}}</span>
                            <span>{{item.testTime}}</span>
                        </li>
                        <li style="width:100%;text-align:center;line-height:170px;" v-if="noData">列表暂无数据</li>
                    </ul>
                </div>
                <div class="xyqk">
                    <div class="useNumber">
                        <div class="useImg">
                            <img src="../assets/images/syqk.png" alt="" >
                        </div>
                        <div class="size">
                            <b>{{instrumentUseAllNum}}</b>
                            <span>次</span>
                        </div>
                        <p>总共使用次数</p>
                    </div>
                    <div class="useContent">
                        <p>使用情况</p>
                        <span class="useTitle" style="margin-top:30px;">设备上传次数（今日）</span>
                        <span class="userNumberName">{{instrumentUseTodayNum}}</span>
                        <span>次</span>
                        <span class="useTitle">活跃设备台数（今日）</span>
                        <span class="userNumberName">{{instrumentActiveTodayNum}}</span>
                        <span>台</span>
                    </div>
                </div>
            </div>
            <div class="moduleContent">
                <div class="title" style="margin-bottom:22px;">
                    <span class="titleText"></span>
                    <span>仪器使用次数</span>
                </div>
                <div class="bpData" style="width:950px;margin-top:20px;">
                    <h4>血压仪</h4>
                    <select name="" id="" class="select bgDataBar" @change="bpDataSelect()" v-model="bpDataOption">
                        <option value="">全部</option>
                        <option value="1">日</option>
                        <option value="2">周</option>
                        <option value="3">月</option>
                        <option value="4">季</option>
                        <option value="5">半年</option>
                        <option value="6">年</option>
                    </select>
                    <div id="insturmentBar" style="height:360px;width:100%;"></div>
                </div>
                <div class="bpData" style="width:950px;margin-top:20px;">
                    <h4>血糖仪</h4>
                    <select name="" id="" class="select bgDataBar" v-model="bsDataOption" @change="bsDataSelect()">
                        <option value="">全部</option>
                        <option value="1">日</option>
                        <option value="2">周</option>
                        <option value="3">月</option>
                        <option value="4">季</option>
                        <option value="5">半年</option>
                        <option value="6">年</option>
                    </select>
                    <div id="insturmentTypeBar" style="height:360px;width:100%;"></div>
                </div>
            </div>
            <div class="moduleContent">
                <div class="title" style="margin-bottom:22px;">
                    <span class="titleText"></span>
                    <span>仪器绑定数量</span>
                </div>
                <div class="bpData" style="width:950px;margin-top:20px;">
                    <h4>血压仪</h4>
                    <input id="beginDate" type="text" class="lay-date" readonly="readonly" ref="instrumentYear" style="float:right;">
                    <div id="insturmentBindBar" style="height:360px;width:100%;"></div>
                </div>
                <div class="bpData" style="width:950px;margin-top:20px;">
                    <h4>血糖仪</h4>
                    <input id="endDate" type="text" class="lay-date" readonly="readonly" ref="instrumentYear" style="float:right;">
                    <div id="insturmentTypeBindBar" style="height:360px;width:100%;"></div>
                </div>
            </div>
            <div class="moduleContent">
                <div class="title" style="margin-bottom:22px;">
                    <span class="titleText"></span>
                    <span>慢病新增设备绑定数量</span>
                </div>
                <div>
                    <div class="search">
                        <label for="">年份</label>
                        <input id="bpAddData" type="text" class="lay-date" readonly="readonly" ref="instrumentYear">
                    </div>
                    <div style="width:1000px;margin-left:15px;margin-top:20px;min-width:920px;">
                        <ul class="month">
                            <li>

                            </li>
                            <li>1月</li>
                            <li>2月</li>
                            <li>3月</li>
                            <li>4月</li>
                            <li>5月</li>
                            <li>6月</li>
                            <li>7月</li>
                            <li>8月</li>
                            <li>9月</li>
                            <li>10月</li>
                            <li>11月</li>
                            <li>12月</li>
                            <li>总计</li>
                        </ul>
                        <ul class="month">
                            <li>高血压</li>
                            <li v-for="(item,index) in bpData">
                                {{item}}
                            </li>
                            <li>
                                {{bpDataCount}}
                            </li>
                        </ul>
                        <ul class="month">
                            <li>糖尿病</li>
                            <li v-for="(item,index) in bfData">
                                {{item}}
                            </li>
                            <li>
                                {{bfDataCount}}
                            </li>
                        </ul>
                        <ul class="month" style="display:none">
                            <li>高血脂</li>
                            <li v-for="(item,index) in bgData">
                                {{item}}
                            </li>
                        </ul>
                        <ul class="month" style="display:none">
                            <li>骨松</li>
                            <li v-for="(item,index) in blData">
                                {{item}}
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="bpData" style="width:950px;margin-top:40px;">
                    <h4>高血压新增绑定</h4>
                    <div id="bpDataBar" style="height:360px;width:100%;"></div>
                </div>
                <div class="bpData" style="width:950px;margin-top:40px;display:none;">
                    <h4>高血脂新增绑定</h4>
                    <div id="bgDataBar" style="height:360px;width:100%;"></div>
                </div>
                <div class="bpData" style="width:950px;margin-top:40px;">
                    <h4>糖尿病新增绑定</h4>
                    <div id="bfDataBar" style="height:360px;width:100%;"></div>
                </div>
                <div class="bpData" style="width:950px;margin-top:40px;display:none;">
                    <h4>骨松新增绑定</h4>
                    <div id="blDataBar" style="height:360px;width:100%;"></div>
                </div>
            </div>

            <div class="moduleContent">
                <div class="title" style="margin-bottom:22px;">
                    <span class="titleText"></span>
                    <span>慢病新增档案人数</span>
                </div>
                <div>
                    <div class="search">
                        <label for="">年份</label>
                        <input id="bpAddDatafiles" type="text" class="lay-date" readonly="readonly" ref="instrumentYear">
                    </div>
                    <div style="width:1000px;margin-left:15px;margin-top:20px;min-width:920px;">
                        <ul class="month">
                            <li>

                            </li>
                            <li>1月</li>
                            <li>2月</li>
                            <li>3月</li>
                            <li>4月</li>
                            <li>5月</li>
                            <li>6月</li>
                            <li>7月</li>
                            <li>8月</li>
                            <li>9月</li>
                            <li>10月</li>
                            <li>11月</li>
                            <li>12月</li>
                            <li>总计</li>
                        </ul>
                        <ul class="month">
                            <li>高血压</li>
                            <li v-for="(item,index) in bpDataFiles">
                                {{item}}
                            </li>
                            <li>
                                {{bpDataCountfiles}}
                            </li>
                        </ul>
                        <ul class="month">
                            <li>糖尿病</li>
                            <li v-for="(item,index) in bfDataFiles">
                                {{item}}
                            </li>
                            <li>
                                {{bfDataCountfiles}}
                            </li>
                        </ul>
                        <ul class="month">
                            <li>高血脂</li>
                            <li v-for="(item,index) in bgDataFiles">
                                {{item}}
                            </li>
                            <li>
                                {{bgDataCountfiles}}
                            </li>
                        </ul>
                        <ul class="month">
                            <li>骨松</li>
                            <li v-for="(item,index) in bsDataFiles">
                                {{item}}
                            </li>
                            <li>
                                {{bsDataCountfiles}}
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="bpData" style="width:950px;margin-top:40px;">
                    <h4>高血压档案新增</h4>
                    <div id="bpDataBarfiles" style="height:360px;width:100%;"></div>
                </div>
                <div class="bpData" style="width:950px;margin-top:40px;">
                    <h4>高血脂档案新增</h4>
                    <div id="bgDataBarfiles" style="height:360px;width:100%;"></div>
                </div>
                <div class="bpData" style="width:950px;margin-top:40px;">
                    <h4>糖尿病档案新增</h4>
                    <div id="bfDataBarfiles" style="height:360px;width:100%;"></div>
                </div>
                <div class="bpData" style="width:950px;margin-top:40px;">
                    <h4>骨松档案新增</h4>
                    <div id="bsDataBarfiles" style="height:360px;width:100%;"></div>
                </div>
            </div>

            <div class="moduleContent">
                <div class="title" style="margin-bottom:22px;">
                    <span class="titleText"></span>
                    <span>随访月度统计</span>
                </div>
                <div class="bpData" style="width:950px;margin-top:20px;">
                    <h4>高血压随访统计</h4>
                    <input id="bpAccompany" type="text" class="lay-date" readonly="readonly" style="float:right">
                    <div id="bpAccompanyDataBar" style="height:360px;width:100%;"></div>
                </div>
                <div class="bpData" style="width:950px;margin-top:40px;">
                    <h4>糖尿病随访统计</h4>
                    <input id="bgAccompany" type="text" class="lay-date" readonly="readonly" style="float:right">
                    <div id="bgAccompanyDataBar" style="height:360px;width:100%;"></div>
                </div>
                <div class="bpData" style="width:950px;margin-top:40px;">
                    <h4>高血脂随访统计</h4>
                    <input id="bfAccompany" type="text" class="lay-date" readonly="readonly" style="float:right">
                    <div id="bfAccompanyDataBar" style="height:360px;width:100%;"></div>
                </div>
                <div class="bpData" style="width:950px;margin-top:40px;">
                    <h4>骨松随访统计</h4>
                    <input id="blAccompany" type="text" class="lay-date" readonly="readonly" style="float:right">
                    <div id="blAccompanyDataBar" style="height:360px;width:100%;"></div>
                </div>
            </div>
            <div class="moduleContent">
                <div class="title" style="margin-bottom:22px;">
                    <span class="titleText"></span>
                    <span>慢病新增特殊处理人数</span>
                </div>
                <div class="bpData" style="width:950px;margin-top:20px;">
                    <h4>特殊处理病人新增</h4>
                   <input id="specialAccompany" type="text" class="lay-date" readonly="readonly" style="float:right">
                    <div id="specialAccompanyDataBar" style="height:360px;width:100%;"></div>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    var vm = new Vue({
        el:'.wrap',
        data:{
            //2018年至今年总仪器数量
            instrumentNumber:'',
            //近30天新增仪器数量
            instrumentNewNum:'',
            // 血压仪绑定数量
            insturmentBindBar:['','','','','','','','','','','',''],
            // 血糖仪绑定数量
            insturmentTypeBindBar:['','','','','','','','','','','',''],
            // 判断列表是否有数据
            noData:false,
            // 2018年至当年病人总数
            patientNum:'',
            // 30天新增人数
            patientNewNum:'',
            //当年血压测试正常结果次数
            countPatientBpTests:'',
            // 设备使用次数
            instrumentUseAllNum:'',
            // 近十次使用人
            tenUseMsg:'',
            // 今天设备使用情况
            instrumentUseTodayNum:'',
            // 活跃设备
            instrumentActiveTodayNum:'',
            // 近10次使用情况
            tenUseMsg:[],
            // 当前筛选状态
            type:[
                {
                    name:'全部',
                    id:'0',
                    key:'type0',
                    checked:'checked'
                },
                {
                    name:'高血压',
                    id:'1',
                    key:'type1',
                    checked:''
                },
                {
                    name:'糖尿病',
                    id:'2',
                    key:'type2',
                    checked:''
                }
            ],
            // 设备上传次数
            instrumentUseTodayNum:'',
            // 活跃设备
            instrumentActiveTodayNum:'',
            // 当前年份
            year:'',
            // 高血压数据
            bpData:['','','','','','','','','','','',''],
            // 高血糖数据
            bgData:['','','','','','','','','','','',''],
            // 高血脂数据
            bfData:['','','','','','','','','','','',''],
            // 骨松数据
            blData:['','','','','','','','','','','',''],
            // 血压仪数据
            insturmentData:{
                // 活跃设备数量
                instrumentActiveDate:['','','','','','','',''],
                // 设备使用次数
                instrumentUseDate:['','','','','','','','']
            },
            // 血糖仪数据
            insturmentTypeData:{
                // 活跃设备数量
                instrumentActiveDate:['','','','','','','',''],
                // 设备使用次数
                instrumentUseDate:['','','','','','','','']
            },
            // 骨松随访统计数据
            blAccompany: ['','','','','','','','','','','',''],
            // 高血压随访统计数据
            bpAccompany:['','','','','','','','','','','',''],
            // 糖尿病随访统计数据
            bgAccompany:['','','','','','','','','','','',''],
            // 高血脂随访统计数据
            bfAccompany:['','','','','','','','','','','',''],
            // 特殊处理病人数据
            specialAccompany:['','','','','','','','','','','',''],
            // x轴默认月份为单位
            xData:['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],
            specialXData:['1月','2月','3月','4月','5月','6月','7月','8月','9月','10月','11月','12月'],
            specialDataArr: [],
            // 设备图Y轴单位
            yDataInsturment:['0:00-6:00','6:00-8:00','8:00-10:00','10:00-12:00','12:00-14:00','14:00-16:00','16:00-18:00','18:00-24:00'],
            bpDataOption:'',
            bsDataOption:'',
            // 高血压统计
            bpDataCount: 0,
            // 糖尿病统计
            bfDataCount: 0,
            yearDate:[],
            noSpecialData: false,
            // 慢病新增档案人数
            bpDataFiles: ['','','','','','','','','','','',''],
            bfDataFiles: ['','','','','','','','','','','',''],
            bgDataFiles: ['','','','','','','','','','','',''],
            bsDataFiles: ['','','','','','','','','','','',''],
            bpDataCountfiles: 0,
            bfDataCountfiles: 0,
            bgDataCountfiles: 0,
            bsDataCountfiles: 0
        },
        mounted(){
            let that = this;
            // that.blData = Array.of(12);
            that.getUseData('0');
            //that.getcountPatientBpTests();
            // 初始化获取当前年份
            var date = new Date;
            that.year = date.getFullYear();
            that.getBpData(1)
            that.getBfData(2)
            that.getBgData(3)
            that.getBlData(4)
            that.getInstrumentData(1)
            that.getInstrumentTypeData(2)
            that.getBpAccompany(1)
            that.getBgAccompany(2)
            that.getBfAccompany(3)
            that.getBlAccompany(4) //骨松随访统计
            that.getInsturmentBindData(1)
            that.getInsturmentTypeBindData(2)
            that.getSpecialAccompany(null)
            // 获取当前年份
            var date = new Date();
            var year = date.getFullYear();
            $('#bpAddDatafiles').val(year);
            that.getfilesData();
            $('#beginDate').val(year)
            $('#endDate').val(year)
            $('#bpAddData').val(year)
            $('#bpAccompany').val(year)
            $('#bgAccompany').val(year)
            $('#bfAccompany').val(year)
            $('#blAccompany').val(year)
            $('#specialAccompany').val(year)
            $('#bpAddDatafiles').datetimepicker({
                format: 'yyyy',
                weekStart: 1,
                autoclose: true,
                startView: 4,
                minView: 4,
//                forceParse: false,
                language: 'zh-CN',
                onClose: that.getfilesData
            }).on('changeDate',that.getfilesData);

            $('#blAccompany').datetimepicker({
                format: 'yyyy',
                weekStart: 1,
                autoclose: true,
                startView: 4,
                minView: 4,
//                forceParse: false,
                language: 'zh-CN',
                onClose: that.gotoblAccompanyDate
            }).on('changeDate',that.gotoblAccompanyDate);
            $('#specialAccompany').datetimepicker({
                format: 'yyyy',
                weekStart: 1,
                autoclose: true,
                startView: 4,
                minView: 4,
//                forceParse: false,
                language: 'zh-CN',
                onClose: that.gotoSpecialDate
            }).on('changeDate',that.gotoSpecialDate);
            $('#beginDate').datetimepicker({
                format: 'yyyy',
                weekStart: 1,
                autoclose: true,
                startView: 4,
                minView: 4,
//                forceParse: false,
                language: 'zh-CN',
                onClose: that.gotoDate
            }).on('changeDate',that.gotoDate);
            $('#endDate').datetimepicker({
                format: 'yyyy',
                weekStart: 1,
                autoclose: true,
                startView: 4,
                minView: 4,
//                forceParse: false,
                language: 'zh-CN',
                onClose: that.gotoDateBs
            }).on('changeDate',that.gotoDateBs);
            $('#bpAddData').datetimepicker({
                format: 'yyyy',
                weekStart: 1,
                autoclose: true,
                startView: 4,
                minView: 4,
//                forceParse: false,
                language: 'zh-CN',
                onClose: that.getbpAddData
            }).on('changeDate',that.getbpAddData);
            $('#bpAccompany').datetimepicker({
                format: 'yyyy',
                weekStart: 1,
                autoclose: true,
                startView: 4,
                minView: 4,
//                forceParse: false,
                language: 'zh-CN',
                onClose: that.getbpAddData
            }).on('changeDate',that.bpAccompanyData);
            $('#bgAccompany').datetimepicker({
                format: 'yyyy',
                weekStart: 1,
                autoclose: true,
                startView: 4,
                minView: 4,
//                forceParse: false,
                language: 'zh-CN',
                onClose: that.getbpAddData
            }).on('changeDate',that.bgAccompanyData);
            $('#bfAccompany').datetimepicker({
                format: 'yyyy',
                weekStart: 1,
                autoclose: true,
                startView: 4,
                minView: 4,
//                forceParse: false,
                language: 'zh-CN',
                onClose: that.getbpAddData
            }).on('changeDate',that.bfAccompanyData);
        },
        methods:{
            // 初始化获取慢病档案数据
            getfilesData(){
                this.getAddfiles(1,$('#bpAddDatafiles').val());
                this.getAddfiles(2,$('#bpAddDatafiles').val());
                this.getAddfiles(3,$('#bpAddDatafiles').val());
                this.getAddfiles(4,$('#bpAddDatafiles').val());
            },
            // 获取慢病新增档案数据
            getAddfiles(type,year){
                let that = this;
                $.ajax({
                    url: '${URL_COUNT_NEWPATIENTMONTH}',
                    data: {
                        type: type,
                        year: year
                    },
                    type: 'get',
                    dataType:'json',
                    success:function(data){
                        dataList = ['','','','','','','','','','','',''];
                        let max = '';
                        data.data.forEach((item,index)=>{
                            dataList[item.currMonth-1] = item.num
                        })
                        if( data.data.length == 0 ){
                            max = '5'
                        }else{
                            max =  max = Math.max.apply(null, dataList) + 5;
                        }
                        if( type == 1 ){
                            that.bpDataFiles = dataList.map( item => item == '' ? 0 : item );
                            var arr = that.bpDataFiles.filter(item => item == '' ? 0 : item )
                            that.bpDataCountfiles = arr.length != 0 ?  arr.reduce((current, indexCurrent) => {
                                return parseInt(current) + parseInt(indexCurrent)
                            }) : 0;
                            that.initEchart('bpDataBarfiles','人数',that.xData,'高血压档案新增人数',that.bpDataFiles,max)
                        }else if( type == 2 ){
                            that.bfDataFiles = dataList.map( item => item == '' ? 0 : item );
                            var arr = that.bfDataFiles.filter(item => item == '' ? 0 : item )
                            that.bfDataCountfiles = arr.length != 0 ? arr.reduce((current, indexCurrent) => {
                                return parseInt(current) + parseInt(indexCurrent)
                            }) : 0;
                            that.initEchart('bfDataBarfiles','人数',that.xData,'糖尿病档案新增人数',that.bfDataFiles,max)
                        }else if( type == 3 ){
                            that.bgDataFiles = dataList.map( item => item == '' ? 0 : item );
                            var arr = that.bgDataFiles.filter(item => item == '' ? 0 : item )
                            that.bgDataCountfiles = arr.length != 0 ? arr.reduce((current, indexCurrent) => {
                                return parseInt(current) + parseInt(indexCurrent)
                            }) : 0;
                            that.initEchart('bgDataBarfiles','人数',that.xData,'高血脂档案新增人数',that.bgDataFiles,max)
                        }else if( type == 4 ){
                            that.bsDataFiles = dataList.map( item => item == '' ? 0 : item );
                            var arr = that.bsDataFiles.filter(item => item == '' ? 0 : item );
                            that.bsDataCountfiles = arr.length != 0 ? arr.reduce((current, indexCurrent) => {
                                return parseInt(current) + parseInt(indexCurrent)
                            }) : 0;
                            that.initEchart('bsDataBarfiles','人数',that.xData,'骨松档案新增人数',that.bsDataFiles,max)
                        }
                    }
                })
            },
            // 高血压随访
            bpAccompanyData(dateText, inst){
                let that = this;
                that.getAccompanyDataAgain(1,$('#bpAccompany').val(),'bpAccompanyDataBar','人次','高血压随访人次',that.bpAccompany)
            },
            // 高血糖随访
            bgAccompanyData(dateText, inst){
                let that = this;
                that.getAccompanyDataAgain(2,$('#bgAccompany').val(),'bgAccompanyDataBar','人次','高血压随访人次',that.bgAccompany)
            },
            // 高血脂随访
            bfAccompanyData(dateText, inst){
                let that = this;
                that.getAccompanyDataAgain(3,$('#bfAccompany').val(),'bfAccompanyDataBar','人次','高血压随访人次',that.bfAccompany)
            },
            // 特殊处理新增
            gotoSpecialDate(dateText, inst){
                let that = this;
                that.getSpecialDateAgain(null, $('#specialAccompany').val(),'specialAccompanyDataBar','人次','特殊处理人次',that.specialAccompany)
            },
            getSpecialDateAgain(type,year,id,unit,xData,name,dataList){
                let that = this;
                $.ajax({
                    url:'${URL_COUNT_COUNTSPECSPREMONTH}',
                    data:{
                        year:year
                    },
                    dataType:'json',
                    type:'get',
                    success:function(data){
                        dataList = ['','','','','','','','','','','',''];
                        data.data.forEach((item,index)=>{
                            dataList[item.currDate-1] = item.specCount
                        })
                        let max = '';
                        if( data.data.length == 0 ){
                            max = 5;
                        }else{
                            max = Math.max.apply(null, dataList) + 5;
                        }
                        return that.initEchartAgain(id,unit,that.xData,name,dataList,max)
                    }
                })
            },

            // 骨松随访
            gotoblAccompanyDate(dateText, inst){
                let that = this;
                that.getAccompanyDataAgain(4,$('#blAccompany').val(),'blAccompanyDataBar','人次','骨松随访人次',that.blAccompany)
            },
            // 再次获取随访数据
            getAccompanyDataAgain(type,year,id,unit,xData,name,dataList){
                let that = this;
                $.ajax({
                    url:'${URL_COUNT_ACCOMPANYMONTH}',
                    data:{
                        type:type,
                        year:year
                    },
                    dataType:'json',
                    type:'get',
                    success:function(data){
                        dataList = ['','','','','','','','','','','',''];
                        data.data.forEach((item,index)=>{
                            dataList[item.accompany_time-1] = item.num
                        })
                        let max = '';
                        if( data.data.length == 0 ){
                            max = 5;
                        }else{
                            max = Math.max.apply(null, dataList) + 5;
                        }
                        return that.initEchartAgain(id,unit,that.xData,name,dataList,max)
                    }
                })
            },
            getbpAddDatas(){
                this.gotoDateBs();
                this.gotoDate();
            },
            // 高血压年份选择之后的回调
            getbpAddData(dateText, inst){
                let that = this;
                that.getData(1,$('#bpAddData').val(),that.bpData,'bpDataBar','人数',that.xData,'高血压新增绑定人数','bpData')
                that.getData(2,$('#bpAddData').val(),that.bgData,'bfDataBar','人数',that.xData,'糖尿病新增绑定人数','bfData')
//                that.getData(3,$('#bpAddData').val(),that.bfData,'bfDataBar','人数',that.xData,'高血脂新增绑定人数','bfData')
//                that.getData(4,$("#bpAddData").val(),that.blData,'blDataBar','人数',that.xData,'骨松新增绑定人数','blData')
            },
            getDataAgain(type,year,dataList,id,unit,xData,name,string){
                let that = this;
                $.ajax({
                    url:'${URL_COUNT_COUNTINSTRUMENTMONTH}',
                    data:{
                        type:type,
                        year:year
                    },
                    dataType:'json',
                    type:'get',
                    success:function(data){
                        let max = '';
                        dataList = ['','','','','','','','','','','',''];
                        if( data.data.length != 0 ){
                            data.data.forEach((item,index)=>{
                                dataList[item.month-1] = item.num;
                            })
                            max = Math.max.apply(null, dataList) + 5;
                        }else{
                            max = '5'
                        }
                        if( string == 'bpData' ){
                            that.bpData = dataList;
                        }else if( string == 'bfData' ){
                            that.bfData = dataList;
                        }else if( string == 'bgData' ){
                            that.bgData = dataList
                        }else if( string == 'blData' ){
                            that.blData = dataList
                        }
                        return that.initEchartAgain(id,unit,xData,name,dataList,max)
                    }
                })
            },
            // 血糖仪年份选择之后的回调
            gotoDateBs(dateText, inst){
                let that = this;
                that.InsturmentTypeBindDataSelect(2,$('#endDate').val())
            },
            // 血压仪年份选择之后的回调
            gotoDate(dateText, inst){
                let that = this;
                that.InsturmentBindDataSelect(1,$('#beginDate').val())
            },
            // 血压仪使用情况切换
            bpDataSelect(){
                let that = this;
                that.getInDataAgain(that.bpDataOption,1,'insturmentBar','次数','血糖上传次数','活跃设备台数',that.insturmentData)
            },
            // 血糖仪使用情况切换
            bsDataSelect(){
                let that = this;
                that.getInDataAgain(that.bsDataOption,2,'insturmentTypeBar','次数','血糖上传次数','活跃设备台数',that.insturmentTypeData)
            },
            getInDataAgain(type,date,id,unit,name,name1,dataName){
                let that = this;
                $.ajax({
                    url:'${URL_COUNT_INSTRUMENTUSE}',
                    data:{
                        type:date,
                        dateType:type
                    },
                    dataType:'json',
                    type:'get',
                    success:function(data){
                        let activeDateArr = [];
                        let DateArr = [];
                        dataName.instrumentActiveDate = ['','','','','','','',''];
                        dataName.instrumentUseDate = ['','','','','','','',''];
                        // 拼接时间段
                        if( data.data.instrumentActiveDate.length != 0 ){
                            data.data.instrumentActiveDate.forEach((item,index)=>{
                                activeDateArr.push({time:item.start_time + '-' + item.end_time,num:item.num})
                            })
                            activeDateArr.forEach((item,index)=>{
                                that.yDataInsturment.forEach((itm,key)=>{
                                    if( item.time == itm ){
                                        dataName.instrumentActiveDate[key] = item.num
                                    }
                                })
                            })
                        }
                        if( data.data.instrumentUseDate.length != 0 ){
                            data.data.instrumentUseDate.forEach((item,index)=>{
                                DateArr.push({time:item.start_time + '-' + item.end_time,num:item.num})
                            })
                            DateArr.forEach((item,index)=>{
                                that.yDataInsturment.forEach((itm,key)=>{
                                    if( item.time == itm ){
                                        dataName.instrumentUseDate[key] = item.num
                                    }
                                })
                            })
                        }
                        let maxActive = '';
                        let maxUse = '';
                        let max = ''
                        if( dataName.instrumentActiveDate.length != 0 ){
                            maxActive = Math.max.apply(null, dataName.instrumentActiveDate) + 10;
                        }else{
                            maxActive = '10'
                        }
                        if( dataName.instrumentUseDate.length != 0 ){
                            maxUse = Math.max.apply(null, dataName.instrumentUseDate) + 10;
                        }else{
                            maxUse = '10'
                        }
                        if( maxActive >= maxUse ){
                            max = maxActive
                        }else{
                            max = maxUse
                        }
                        if( data.data.instrumentActiveDate.length == 0 ){
                            dataName.instrumentActiveDate = ['','','','','','','','']
                        }
                        if( data.data.instrumentUseDate.length == 0 ){
                            dataName.instrumentUseDate = ['','','','','','','','']
                        }
                        return that.instrumentrEchartAgain(id,unit,that.yDataInsturment,name,name1,dataName.instrumentActiveDate,dataName.instrumentUseDate,max)
                    }
                })
            },
            instrumentrEchartAgain(id,unit,xData,name,name1,instrumentActiveDate,instrumentUseDate,maxVal){
                let that = this;
                var myChart = echarts.init(document.getElementById(id))
                myChart.setOption({
                    yAxis : [
                        {
                            type : 'value',
                            max:maxVal,
                            min:0,
                            'axisLabel':{
                                'intreval':0,
                                'textStyle':{
                                    'color':'#666666',
                                    'fontSize':'14',
                                    'shadowOffset':-5
                                }
                            },
                            'splitLine' : {
                                'show' : false
                            },
                            'axisLine':{
                                'lineStyle':{
                                    'color':'#b6b6b6'
                                },
                                'show':false
                            },
                            'axisTick':{
                                'show':false
                            }
                        }
                    ],
                    series : [
                        {
                            name:name,
                            type:'bar',
                            data:instrumentActiveDate,
                            barWidth : 30,
                            itemStyle:{
                                normal:{
                                    color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
                                        offset: 1,
                                        color: '#7e80d6'
                                    },{
                                        offset: 0,
                                        color: '#31aefe'
                                    }]),
                                    barBorderRadius:[5, 5, 5, 5],
                                    label: {
                                        show: true, //开启显示
                                        position: 'top', //在上方显示
                                        textStyle: { //数值样式
                                            color: 'black',
                                            fontSize: 16
                                        }
                                    }
                                }
                            }
                        },
                        {
                            name:name1,
                            type:'bar',
                            data:instrumentUseDate,
                            barWidth : 30,
                            itemStyle:{
                                normal:{
                                    color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
                                        offset: 1,
                                        color: '#7e80d6'
                                    },{
                                        offset: 0,
                                        color: '#31aefe'
                                    }]),
                                    barBorderRadius:[5, 5, 5, 5],
                                    label: {
                                        show: true, //开启显示
                                        position: 'top', //在上方显示
                                        textStyle: { //数值样式
                                            color: 'black',
                                            fontSize: 16
                                        }
                                    }
                                }
                            }
                        }
                    ]
                })
            },
            // 血压仪绑定数据年份切换
            InsturmentBindDataSelect(type,year){
                let that = this;
                that.getInsturmentBindDataListAgain(1,year,'insturmentBindBar','台',that.xData,'血压仪绑定数量',that.insturmentBindBar)
            },
            InsturmentTypeBindDataSelect(type,year){
                let that = this;
                that.getInsturmentBindDataListAgain(2,year,'insturmentTypeBindBar','台',that.xData,'血糖仪绑定数量',that.insturmentTypeBindBar)
            },
            getInsturmentBindDataListAgain(type,year,id,unit,xData,name,dataList){
                let that = this;
                $.ajax({
                    url:'${URL_COUNT_INSTRUMENTMONTH}',
                    data:{
                        type:type,
                        year:year
                    },
                    dataType:'json',
                    type:'get',
                    success:function(data){
                        dataList = ['','','','','','','','','','','',''];
                        let max = '';
                        data.data.forEach((item,index)=>{
                            dataList[item.bind_time-1] = item.num
                        })
                        if( data.data.length == 0 ){
                            max = '5'
                        }else{
                            max =  max = Math.max.apply(null, dataList) + 5;
                        }
                        that.initEchartAgain(id,unit,xData,name,dataList,max)
                    }
                })
            },
            initEchartAgain(id,unit,xData,name,dataList,maxVal){
                let that = this;
                var myChart = echarts.init(document.getElementById(id))
                myChart.setOption({
                    yAxis : [
                        {
                            type : 'value',
                            max:maxVal,
                            min:0,
                            'axisLabel':{
                                'intreval':0,
                                'textStyle':{
                                    'color':'#666666',
                                    'fontSize':'14',
                                    'shadowOffset':-5
                                }
                            },
                            'splitLine' : {
                                'show' : false
                            },
                            'axisLine':{
                                'lineStyle':{
                                    'color':'#b6b6b6'
                                },
                                'show':false
                            },
                            'axisTick':{
                                'show':false
                            }
                        }
                    ],
                    series : [
                        {
                            name:name,
                            type:'bar',
                            data:dataList,
                            barWidth : 30,
                            itemStyle:{
                                normal:{
                                    color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
                                        offset: 1,
                                        color: '#7e80d6'
                                    },{
                                        offset: 0,
                                        color: '#31aefe'
                                    }]),
                                    barBorderRadius:[5, 5, 5, 5],
                                }
                            }
                        }
                    ]
                })
            },
            // 获取血压仪绑定数据
            getInsturmentBindData(type){
                let that = this;
                that.getInsturmentBindDataList(type,that.year,'insturmentBindBar','台',that.xData,'血压仪绑定数量',that.insturmentBindBar)
            },
            // 获取血糖仪绑定数据
            getInsturmentTypeBindData(type){
                let that = this;
                that.getInsturmentBindDataList(type,that.year,'insturmentTypeBindBar','台',that.xData,'血糖仪绑定数量',that.insturmentTypeBindBar)
            },
            getInsturmentBindDataList(type,year,id,unit,xData,name,dataList){
                let that = this;
                $.ajax({
                    url:'${URL_COUNT_INSTRUMENTMONTH}',
                    data:{
                        type:type,
                        year:year
                    },
                    dataType:'json',
                    type:'get',
                    success:function(data){
                        let max = '';
                        data.data.forEach((item,index)=>{
                            dataList[item.bind_time-1] = item.num
                        })
                        if( data.data.length == 0 ){
                            max = '5'
                        }else{
                            max =  max = Math.max.apply(null, dataList) + 5;
                        }
                        that.initEchart(id,unit,xData,name,dataList,max)
                    }
                })
            },
//            // 获取高血压随访统计年份切换数据
//            getBpAccompanyAgain(type,year){
//                let that = this;
//                that.getDataAgain(type,year,that.bpData,'bpDataBar','人数',that.xData,'高血压新增绑定')
//            },
            // 随访
            getAccompanyData(type,year,id,unit,xData,name,dataList){
                let that = this;
                $.ajax({
                    url:'${URL_COUNT_ACCOMPANYMONTH}',
                    data:{
                        type:type,
                        year:year
                    },
                    dataType:'json',
                    type:'get',
                    success:function(data){
                        data.data.forEach((item,index)=>{
                            dataList[item.accompany_time-1] = item.num
                        })
                        let max = '';
                        if( data.data.length == 0 ){
                            max = 5;
                        }else{
                            max = Math.max.apply(null, dataList) + 5;
                        }
                        that.initEchartAgain(id,unit,that.xData,name,dataList,max)
                    }
                })
            },
            getSpecialDate(type,year,id,unit,xData,name,dataList){
                let that = this;
                $.ajax({
                    url:'${URL_COUNT_COUNTSPECSPREMONTH}',
                    data:{
                        year:year
                    },
                    dataType:'json',
                    type:'get',
                    success:function(data){
                        dataList = ['','','','','','','','','','','',''];
                        data.data.forEach((item,index)=>{
                            dataList[item.currDate-1] = item.specCount
                        })
                        let max = '';
                        if( data.data.length == 0 ){
                            max = 5;
                        }else{
                            max = Math.max.apply(null, dataList) + 5;
                        }
                        that.initEchart(id,unit,that.xData,name,dataList,max)
                    }
                })

            },
            // 获取高血压数据
            getBpData(type){
                let that = this;
                that.getData(type,that.year,that.bpData,'bpDataBar','人数',that.xData,'高血压新增绑定人数','bpData')
            },
            // 获取高血脂数据
            getBfData(type){
                let that = this;
                that.getData(type,that.year,that.bfData,'bfDataBar','人数',that.xData,'糖尿病新增绑定人数','bfData')
            },
            // 获取糖尿病数据
            getBgData(type){
                let that = this;
                that.getData(type,that.year,that.bgData,'bgDataBar','人数',that.xData,'高血脂新增绑定人数','bgData')
            },
            // 获取骨松数据
            getBlData(type){
                let that = this;
                that.getData(type,that.year,that.blData,'blDataBar','人数',that.xData,'骨松新增绑定人数','blData')
            },
            // 获取血压仪数据
            getInstrumentData(type){
                let that = this;
                that.getInData(type,'','insturmentBar','次数','血压上传次数','活跃设备台数',that.insturmentData)
            },
            // 获取高血压随访统计数据
            getBpAccompany(type){
                let that = this;
                that.getAccompanyData(type,that.year,'bpAccompanyDataBar','人次',that.xData,'高血压随访统计人次',that.bpAccompany)
            },
            // 获取糖尿病随访统计数据
            getBgAccompany(type){
                let that = this;
                that.getAccompanyData(type,that.year,'bgAccompanyDataBar','人次',that.xData,'糖尿病随访统计人次',that.bgAccompany)
            },
            // 获取高血脂随访统计数据
            getBfAccompany(type){
                let that = this;
                that.getAccompanyData(type,that.year,'bfAccompanyDataBar','人次',that.xData,'高血脂随访统计人次',that.bfAccompany)
            },
            // 获取骨松随访统计数据
            getBlAccompany(type){
                let that = this;
                that.getAccompanyData(type,that.year,'blAccompanyDataBar','人次',that.xData,'骨松随访统计人次',that.bfAccompany)
            },
            getSpecialAccompany(type){
                let that = this;
                that.getSpecialDate(type, that.year,'specialAccompanyDataBar','人次',that.xData,'特殊处理统计人次',that.specialAccompany)
            },
            // 获取随访统计数据
            getAccompanyData(type,year,id,unit,xData,name,dataList){
                let that = this;
                $.ajax({
                    url:'${URL_COUNT_ACCOMPANYMONTH}',
                    data:{
                        type:type,
                        year:year
                    },
                    dataType:'json',
                    type:'get',
                    success:function(data){
                        data.data.forEach((item,index)=>{
                            dataList[item.accompany_time-1] = item.num
                        })
                        let max = '';
                        if( data.data.length == 0 ){
                            max = 5;
                        }else{
                            max = Math.max.apply(null, dataList) + 5;
                        }
                        that.initEchart(id,unit,that.xData,name,dataList,max)
                    }
                })
            },
            // 获取特殊病人人数
                <%--getMonthSpecial(unit,name){--%>
                    <%--let that = this;--%>
                    <%--var dateArr = [];--%>
                    <%--var totalData = [];--%>
                    <%--$.ajax({--%>
                        <%--url:'${URL_COUNT_COUNTSPECSLASTMONTH}',--%>
                        <%--dataType:'json',--%>
                        <%--type:'post',--%>
                        <%--success:function(data){--%>
                            <%--data.data.countSpecList.forEach((item,index)=>{--%>
                                <%--totalData.push(item.specCount);--%>
                                <%--dateArr.push(item.currDate.slice(0,12))--%>
                            <%--})--%>
                            <%--that.specialDataArr = totalData;--%>
                            <%--let max = '';--%>
                            <%--if( data.data.countSpecList.length == 0 ){--%>
                                <%--that.noSpecialData = true;--%>
                            <%--}else{--%>
                                <%--that.noSpecialData = false;--%>
                                <%--max = Math.max.apply(null, totalData)+2;--%>
                                <%--that.specialXData = dateArr;--%>
                            <%--}--%>
                            <%--that.initSpecilEchart(unit,name,that.specialDataArr,max,that.specialXData)--%>
                        <%--}--%>
                    <%--})--%>
                <%--},--%>
            // 获取血糖仪数据
            getInstrumentTypeData(type){
                let that = this;
                that.getInData(type,'','insturmentTypeBar','次数','血糖上传次数','活跃设备台数',that.insturmentTypeData)
            },
            getInData(type,date,id,unit,name,name1,dataName){
                let that = this;
                $.ajax({
                    url:'${URL_COUNT_INSTRUMENTUSE}',
                    data:{
                        type:type,
                        dateType:date
                    },
                    dataType:'json',
                    type:'get',
                    success:function(data){
                        let activeDateArr = [];
                        let DateArr = [];
                        dataName.instrumentActiveDate = ['','','','','','','','']
                        dataName.instrumentUseDate = ['','','','','','','','']
                        // 拼接时间段\
                        data.data.instrumentActiveDate.forEach((item,index)=>{
                            activeDateArr.push({time:item.start_time + '-' + item.end_time,num:item.num})
                        })
                        data.data.instrumentUseDate.forEach((item,index)=>{
                            DateArr.push({time:item.start_time + '-' + item.end_time,num:item.num})
                        })
                        activeDateArr.forEach((item,index)=>{
                            that.yDataInsturment.forEach((itm,key)=>{
                                if( item.time == itm ){
                                   dataName.instrumentActiveDate[key] = item.num
                                }
                            })
                        })
                        DateArr.forEach((item,index)=>{
                            that.yDataInsturment.forEach((itm,key)=>{
                                if( item.time == itm ){
                                    dataName.instrumentUseDate[key] = item.num
                                }
                            })
                        })
                        let maxActive = '';
                        let maxUse = '';
                        let max = ''
                        if( dataName.instrumentActiveDate.length != 0 ){
                            maxActive = Math.max.apply(null, dataName.instrumentActiveDate) + 10;
                        }else{
                            maxActive = '10'
                        }
                        if( dataName.instrumentUseDate.length != 0 ){
                            maxUse = Math.max.apply(null, dataName.instrumentUseDate) + 10;
                        }else{
                            maxUse = '10'
                        }
                        if( maxActive >= maxUse ){
                            max = maxActive
                        }else{
                            max = maxUse
                        }
                        if( data.data.instrumentActiveDate.length == 0 ){
                            dataName.instrumentActiveDate = ['','','','','','','','']
                        }
                        if( data.data.instrumentUseDate.length == 0 ){
                            dataName.instrumentUseDate = ['','','','','','','','']
                        }
                        return that.instrumentrEchart(id,unit,that.yDataInsturment,name,name1,dataName.instrumentActiveDate,dataName.instrumentUseDate,max)
                    }
                })
            },
            // 调用数据函数
            getData(type,year,dataList,id,unit,xData,name,string){
                let that = this;
                $.ajax({
                    url:'${URL_COUNT_COUNTINSTRUMENTMONTH}',
                    data:{
                        type:type,
                        year:year
                    },
                    dataType:'json',
                    type:'get',
                    success:function(data){
                        let max = '';
                        if( string == 'bpData' ){
                            if( data.data != null ){
                                data.data.forEach((item,index)=>{
                                    item.num = item.countAll;
                                    item.secondNum = item.countFromMS;
                                    that.bpData[item.currMonth-1] = item.num;
                                    that.$set(that.bpData,item.currMonth-1,item.num)
                                })
                                var arr = that.bpData.filter(item => item !== '' && item !== 0 );
                                that.bpDataCount = arr.length != 0 ? arr.reduce(( current, nextCurrent )=>  { return current+nextCurrent } ) : 0
                                max = Math.max.apply(null, dataList) + 5;
                            }else{
                                max = '5'
                            }
                        }else if( string == 'bfData' ){
                            if( data.data != null ){
                                data.data.forEach((item,index)=>{
                                    item.num = item.countAll;
                                    item.secondNum = item.countFromMS;
                                    that.bfData[item.currMonth-1] = item.num;
                                    that.$set(that.bfData,item.currMonth-1,item.num)
                                })
                                var arr = that.bfData.filter(item => item !== '' && item !== 0 );
                                that.bfDataCount = arr.length != 0 ? arr.reduce(( current, nextCurrent )=>  { return current+nextCurrent } ) : 0
                                max = Math.max.apply(null, dataList) + 5;
                            }else{
                                max = '5'
                            }
                        }else if( string == 'bgData' ){
                            if( data.data != null ){
                                data.data.forEach((item,index)=>{
                                    item.num = item.countAll;
                                    item.secondNum = item.countFromMS;
                                    that.bgData[item.currMonth-1] = item.num;
                                    that.$set(that.bgData,item.currMonth-1,item.num)
                                })
                                max = Math.max.apply(null, dataList) + 5;
                            }else{
                                max = '5'
                            }
                        }else if( string == 'blData' ){
                            if( data.data != null ){
                                data.data.forEach((item,index)=>{
                                    item.num = item.countAll;
                                    item.secondNum = item.countFromMS;
                                    that.blData[item.currMonth-1] = item.num;
                                    that.$set(that.blData,item.currMonth-1,item.num)
                                })
                                max = Math.max.apply(null, dataList) + 5;
                            }else{
                                max = '5'
                            }
                        }
                        return that.initEchart(id,unit,xData,name,dataList,max)
                    }
                })
            },
            // 设备视图
            instrumentrEchart(id,unit,xData,name,name1,instrumentActiveDate,instrumentUseDate,maxVal){
                var myChart = echarts.init(document.getElementById(id))
                var option = {
                    title : {
                        subtext:unit,
                        subtextStyle:{
                            //文字颜色
                            color:'#2a3137',
                            //字体风格,'normal','italic','oblique'
                            fontStyle:'normal',
                            //字体粗细 'normal','bold','bolder','lighter',100 | 200 | 300 | 400...
                            fontWeight:'weight',
                            //字体系列
                            fontFamily:'sans-serif',
                            //字体大小
                            fontSize:15
                        }
                    },
                    grid:{
                        left:'0%',
                        right:'0',
                        top:'18%',
                        bottom:'5%',
                        containLabel:true,
                        y2:50,
                        borderWidth:'0'
                    },
                    tooltip : {
                        trigger: 'axis'
                    },
                    toolbox: {
                        show : true,
                    },
                    calculable : true,
                    xAxis : [
                        {
                            type : 'category',
                            data : xData,
                            'axisLabel':{
                                'intreval':'auto',
                                'textStyle':{
                                    'color':'black',
                                    'fontSize':'14'
                                }
                            },
                            'splitLine':{
                                'show':false
                            },
                            'axisLine':{
                                'lineStyle':{
                                    'color':'#b6b6b6'
                                },
                                'onZero':false,
                                'show':false
                            },
                            'axisTick':{
                                'show':false
                            }
                        }
                    ],
                    yAxis : [
                        {
                            type : 'value',
                            max:maxVal,
                            min:0,
                            'axisLabel':{
                                'intreval':0,
                                'textStyle':{
                                    'color':'#666666',
                                    'fontSize':'14',
                                    'shadowOffset':-5
                                }
                            },
                            'splitLine' : {
                                'show' : false
                            },
                            'axisLine':{
                                'lineStyle':{
                                    'color':'#b6b6b6'
                                },
                                'show':false
                            },
                            'axisTick':{
                                'show':false
                            }
                        }
                    ],
                    series : [
                        {
                            name:name,
                            type:'bar',
                            data:instrumentActiveDate,
                            barWidth : 30,
                            itemStyle:{
                                normal:{
                                    color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
                                        offset: 1,
                                        color: '#7e80d6'
                                    },{
                                        offset: 0,
                                        color: '#31aefe'
                                    }]),
                                    barBorderRadius:[5, 5, 5, 5],
                                    label: {
                                        show: true, //开启显示
                                        position: 'top', //在上方显示
                                        textStyle: { //数值样式
                                            color: 'black',
                                            fontSize: 16
                                        }
                                    }
                                }
                            }
                        },
                        {
                            name:name1,
                            type:'bar',
                            data:instrumentUseDate,
                            barWidth : 30,
                            itemStyle:{
                                normal:{
                                    color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
                                        offset: 1,
                                        color: '#7e80d6'
                                    },{
                                        offset: 0,
                                        color: '#31aefe'
                                    }]),
                                    barBorderRadius:[5, 5, 5, 5],
                                    label: {
                                        show: true, //开启显示
                                        position: 'top', //在上方显示
                                        textStyle: { //数值样式
                                            color: 'black',
                                            fontSize: 16
                                        }
                                    }
                                }
                            }
                        }
                    ]
                }
                myChart.setOption(option);
                window.addEventListener("resize", function () {
                    myChart.resize();
                })
            },
            // 可视化图表
            initEchart(id,unit,xData,name,dataList,maxVal){
                var myChart = echarts.init(document.getElementById(id))
                var option = {
                    title : {
                        subtext:unit,
                        subtextStyle:{
                            //文字颜色
                            color:'#2a3137',
                            //字体风格,'normal','italic','oblique'
                            fontStyle:'normal',
                            //字体粗细 'normal','bold','bolder','lighter',100 | 200 | 300 | 400...
                            fontWeight:'weight',
                            //字体系列
                            fontFamily:'sans-serif',
                            //字体大小
                            fontSize:15
                        }
                    },
                    grid:{
                        left:'0%',
                        right:'0',
                        top:'18%',
                        bottom:'5%',
                        containLabel:true,
                        y2:50,
                        borderWidth:'0'
                    },
                    tooltip : {
                        trigger: 'axis'
                    },
                    toolbox: {
                        show : true,
                    },
                    calculable : true,
                    xAxis : [
                        {
                            type : 'category',
                            data : xData,
                            'axisLabel':{
                                'intreval':'auto',
                                'textStyle':{
                                    'color':'black',
                                    'fontSize':'14'
                                }
                            },
                            'splitLine':{
                                'show':false
                            },
                            'axisLine':{
                                'lineStyle':{
                                    'color':'#b6b6b6'
                                },
                                'onZero':false,
                                'show':false
                            },
                            'axisTick':{
                                'show':false
                            }
                        }
                    ],
                    yAxis : [
                        {
                            type : 'value',
                            max:maxVal,
                            min:0,
                            'axisLabel':{
                                'intreval':0,
                                'textStyle':{
                                    'color':'#666666',
                                    'fontSize':'14',
                                    'shadowOffset':-5
                                }
                            },
                            'splitLine' : {
                                'show' : false
                            },
                            'axisLine':{
                                'lineStyle':{
                                    'color':'#b6b6b6'
                                },
                                'show':false
                            },
                            'axisTick':{
                                'show':false
                            }
                        }
                    ],
                    series : [
                        {
                            name:name,
                            type:'bar',
                            data:dataList,
                            barWidth : 30,
                            itemStyle:{
                                normal:{
                                    color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
                                        offset: 1,
                                        color: '#7e80d6'
                                    },{
                                        offset: 0,
                                        color: '#31aefe'
                                    }]),
                                    barBorderRadius:[5, 5, 5, 5],
                                }
                            }
                        }
                    ]
                }
                myChart.setOption(option);
                window.addEventListener("resize", function () {
                    myChart.resize();
                })
            },
            // 获取仪器使用情况统计数据
            <%--getUseData(id){--%>
                <%--let that = this;--%>
                <%--$.ajax({--%>
                    <%--url:'${URL_COUNT_USECOUNT}',--%>
                    <%--data:{--%>
                        <%--type:id--%>
                    <%--},--%>
                    <%--dataType:'json',--%>
                    <%--type:'get',--%>
                    <%--success:function(data){--%>
                        <%--that.patientNum = data.data.patientNum;--%>
                        <%--that.patientNewNum = data.data.patientNewNum;--%>
                        <%--that.instrumentUseAllNum = data.data.instrumentUseAllNum;--%>
                        <%--that.tenUseMsg = data.data.tenUseMsg;--%>
                        <%--that.instrumentUseTodayNum = data.data.instrumentUseTodayNum;--%>
                        <%--that.instrumentActiveTodayNum = data.data.instrumentActiveTodayNum;--%>
                        <%--if( that.tenUseMsg.length == 0 ){--%>
                            <%--that.noData = true--%>
                        <%--}else{--%>
                            <%--that.noData = false--%>
                        <%--}--%>
                    <%--}--%>
                <%--})--%>
            <%--},--%>
            getUseData(id){
                let that = this;
                $.ajax({
                    url:'${URL_COUNT_INSTRUMENTUSECOUNT}',
                    data:{
                        type:id
                    },
                    dataType:'json',
                    type:'get',
                    success:function(data){
                        that.instrumentNumber = data.data.instrumentNumber;
                        that.instrumentNewNum = data.data.instrumentNewNum;
                        that.instrumentUseAllNum = data.data.instrumentUseAllNum;
                        that.tenUseMsg = data.data.tenUseMsg;
                        that.instrumentUseTodayNum = data.data.instrumentUseTodayNum;
                        that.instrumentActiveTodayNum = data.data.instrumentActiveTodayNum;
                        if( that.tenUseMsg.length == 0 ){
                            that.noData = true
                        }else{
                            that.noData = false
                        }
                    }
                })
                $.ajax({
                    url:'${URL_INDEX_COUNTPATIENTBPTESTS}',
                    data:{
                        type:id
                    },
                    dataType:'json',
                    type:'get',
                    success:function(data){
                        that.countPatientBpTests = data.data.count;
                    }
                })
            },
            getcountPatientBpTests(id){
                let that = this;
                $.ajax({
                    url:'${URL_INDEX_COUNTPATIENTBPTESTS}',
                    data:{
                        type:id
                    },
                    dataType:'json',
                    type:'get',
                    success:function(data){
                        that.countPatientBpTests = data.data.count;
                    }
                })
            },
            changeType(item){
                let that = this;
                that.type.forEach((itm,index)=>{
                    if( itm.id == item.id ){
                        itm.checked = 'checked'
                    }else{
                        itm.checked = ''
                    }
                })
                that.getUseData(item.id)
            },
            initSpecilEchart(unit,name,dataList,maxVal,xData){
                var myChart = echarts.init(document.getElementById("special"));
                var option = {
                    title : {
                        subtext:unit,
                        subtextStyle:{
                            //文字颜色
                            color:'#2a3137',
                            //字体风格,'normal','italic','oblique'
                            fontStyle:'normal',
                            //字体粗细 'normal','bold','bolder','lighter',100 | 200 | 300 | 400...
                            fontWeight:'weight',
                            //字体系列
                            fontFamily:'sans-serif',
                            //字体大小
                            fontSize:15
                        }
                    },
                    grid:{
                        left:'0%',
                        right:'0',
                        top:'18%',
                        bottom:'5%',
                        containLabel:true,
                        y2:50,
                        borderWidth:'0'
                    },
                    tooltip : {
                        trigger: 'axis'
                    },
                    toolbox: {
                        show : true,
                    },
                    calculable : true,
                    xAxis : [
                        {
                            // type : 'time',
                            data : xData,
                            'axisLabel':{
                                'intreval':'auto',
                                'textStyle':{
                                    'color':'black',
                                    'fontSize':'14'
                                }
                            },
                            'splitLine':{
                                'show':false
                            },
                            'axisLine':{
                                'lineStyle':{
                                    'color':'#b6b6b6'
                                },
                                'onZero':false,
                                'show':false
                            },
                            'axisTick':{
                                'show':false
                            }
                        }
                    ],
                    yAxis : [
                        {
                            type : 'value',
                            max:maxVal,
                            min:0,
                            'axisLabel':{
                                'intreval':0,
                                'textStyle':{
                                    'color':'#666666',
                                    'fontSize':'14',
                                    'shadowOffset':-5
                                }
                            },
                            'splitLine' : {
                                'show' : false
                            },
                            'axisLine':{
                                'lineStyle':{
                                    'color':'#b6b6b6'
                                },
                                'show':false
                            },
                            'axisTick':{
                                'show':false
                            }
                        }
                    ],
                    series : [
                        {
                            name:name,
                            type:'bar',
                            data:dataList,
                            barWidth : 30,
                            itemStyle:{
                                normal:{
                                    color: new echarts.graphic.LinearGradient(0, 1, 0, 0, [{
                                        offset: 1,
                                        color: '#7e80d6'
                                    },{
                                        offset: 0,
                                        color: '#31aefe'
                                    }]),
                                    barBorderRadius:[5, 5, 5, 5],
                                }
                            }
                        }
                    ]
                }
                myChart.setOption(option);
                window.addEventListener("resize", function () {
                    myChart.resize();
                })
            },
        }
    })

</script>


</body>
</html>
